#! /bin/bash

for i in `seq 1 6`; do mkdir -p /tmp/$i/objects; done
for i in `seq 1 6`; do mkdir -p /tmp/$i/temp; done
for i in `seq 1 6`; do mkdir -p /tmp/$i/garbage; done
export RABBITMQ_SERVER=amqp://test:test@localhost:5672/
export ES_SERVER=localhost:9200

for i in `seq 1 6`;do 
    rm -rf /tmp/$i/objects/*;
    export LISTEN_ADDRESS=192.168.194.1${i}:12345;export STORAGE_ROOT=/tmp/$i; ./dataServer/dataServer &

done

for i in `seq 1 2`;do
    export LISTEN_ADDRESS=192.168.194.2${i}:12345; ./apiServer/apiServer &

done
